package com.l.d.app.library.util;

import android.content.Context;
import android.text.TextUtils;
import android.widget.Toast;

/**
 * Created by 林德 on 2017/4/4 10:39.
 * <p/>
 */
public class ToastUtil
{
    private static Toast sToast;

    public static void makeTest(Context context, CharSequence text)
    {
        if (context == null || TextUtils.isEmpty(text))
        {
            return;
        }
        if (sToast != null)
        {
            sToast.cancel();
        }
        sToast = Toast.makeText(context, text, Toast.LENGTH_SHORT);
        sToast.show();
    }
}
